﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Threading;

namespace Microsoft.Forums.ForumsClient
{
    public class BaseDataModel : INotifyPropertyChanged
    {
        /// <summary>
        ///  Base Data Model that supports INotifyPropertyChanged
        /// </summary>
        public BaseDataModel()
        {
            
        }

        /// <summary>
        /// Fire the property changed event for the given property name
        /// </summary>
        /// <param name="propertyName">Name of the property</param>
        virtual protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }


        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
